<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="../css/common.css">
    <!-- <link rel="stylesheet" href="../css/detail/peoplecenter.css">
    <link rel="stylesheet" href="../css/detail/studyarea.css">
    <link rel="stylesheet" href="../css/detail/classhoner.css">
    <link rel="stylesheet" href="../css/detail/elegant.css">
    <link rel="stylesheet" href="../css/detail/instrut.css">
    <link rel="stylesheet" href="../css/detail/classhope.css"> -->
    <link rel="stylesheet" href="../css/detail/maindetail.css">
    <link rel="stylesheet" href="../css/swiper.min.css">
    <link rel="stylesheet" href="../css/detail/detail.css">
    <link rel="stylesheet" href="../css/01/publiceAffairs.css">
    <link rel="stylesheet" href="../css/animate.min.css">
    <!-- <link rel="stylesheet" href="../css/detail/peoplecenter.css"> -->
    <link rel="stylesheet" href="../css/datepicker.css">
    <script src="../js/jquery-2.2.4.min.js"></script>
    <script src="../js/datepicker.all.min.js"></script>
    <script src="../js/moment.min.js"></script>
    <script src="../js/fastclick.js"></script>
    <script src="../js/jquery.qrcode.min.js"></script>

</head>
<body>
     <div class="container1 detailContainer1">
            <!-- <input type="file" name='file' id="fileChange"/> -->
         <div class="swiper-container">
				<div class="swiper-wrapper">
<!----------------------------------------- 部门简介 ----------------------------------------------------->
                    <div class="swiper-slide box_bg area_1 swiper-no-swiping">
                    <!-- <div class="swiper-slide box_bg area_1"> -->
                            <div class="container bg-color-bg instructtail">
                                    <div class="top-title">
                                        <div class="top-title">
                                            <div class="system">
                                                    <!-- <a class="goback-syz bg-color-bg" onclick="bzApi.close()">
                                                            <img src="../img/system/main.png" alt="">  
                                                    </a> -->
                                                    <a class="goback-sys bg-color-bg" onclick="tomessage()">
                                                        <img src="../img/system/back.png" alt="">  
                                                    </a>
                                                    <a class="gonext-sys bg-color-bg ineditfirst" id="inedit">
                                                        <img src="../img/system/edit.png" alt="">  
                                                    </a>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="people-content">
                                        <div class="p-p-p instrut">
                                             <div class="classIntru bzjj ani" swiper-animate-effect="rubberBand" swiper-animate-duration="0.5s" swiper-animate-delay="0.3s">
                                                部门简介
                                             </div>
                                             <div class="m-m-person bg-color-border instrut" style="">
                                                  <textarea class="textarearY bg-color-bg instrut textareainstr ani" swiper-animate-effect="zoomInDown" swiper-animate-duration="0.5s" swiper-animate-delay="0.3s" readonly id="textareainstr">
                                                  </textarea>   
                                                  <div class="content">
                                                        <!-- <div class="content-item">
                                                            班组成员12人
                                                        </div> -->
                                                        <!-- <div class="content-item">班组成员11人</div><div class="content-item">工程师11人</div><div class="content-item">技师22人</div><div class="content-item">大专及以上学历31人</div><div class="content-item">助理工程师45人</div><div class="content-item">高级工35人</div><div class="content-item">中共党员52人</div><div class="content-item">高级技师7人</div><div class="content-item">平均年龄26岁</div> -->
                                                  </div>      
                                             </div>
                                        </div>
                                    </div>
                            </div>
                    </div>

<!----------------------------------------- 部门荣誉 ----------------------------------------------------->               
                    <div class="swiper-slide box_bg area_1 swiper-no-swiping">
                    <!-- <div class="swiper-slide box_bg area_1"> -->
                            <div class="container bg-color-bg">
                                    <div class="top-title">
                                        <div class="system">
                                            <!-- <a class="goback-syz bg-color-bg" onclick="bzApi.close()">
                                                    <img src="../img/system/main.png" alt="">  
                                            </a> -->
                                            <a class="goback-sys bg-color-bg"  onclick="tomessage()">
                                                <img src="../img/system/back.png" alt="">  
                                            </a>
                                            <a class="gonext-sys bg-color-bg" id="honner">
                                                <img src="../img/system/edit.png" alt="">  
                                            </a>
                                        </div>
                                    </div>
                                    <div class="people-content">
                                        <div class="p-p-p classhoner">
                                             <div class="classIntru honner ani" swiper-animate-effect="rubberBand" swiper-animate-duration="0.5s" swiper-animate-delay="0.3s">
                                                部门荣誉
                                             </div>
                                             <div class="hanglie">
                            
                                             </div>
                                             <div class="user-left">
                                                <div class="m-m-person m-m-t" id="m-m-t">
                                                   
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                            </div>
                    </div>
 
<!----------------------------------------- 风采剪影 --------------------------------------------------->
                    <!-- <div class="swiper-slide box_bg area_1"> -->
                    <div class="swiper-slide box_bg area_1 swiper-no-swiping">
                            <div class="container bg-color-bg">
                                    <div class="top-title">
                                            <div class="system">
                                                    <!-- <a class="goback-syz bg-color-bg" onclick="bzApi.close()">
                                                            <img src="../img/system/main.png" alt="">  
                                                    </a> -->
                                                    <a class="goback-sys bg-color-bg"  onclick="tomessage()">
                                                       <img src="../img/system/back.png" alt="">  
                                                    </a>
                                                    <a class="gonext-sys bg-color-bg" onclick="fcfcfcf()">
                                                        <img src="../img/system/edit.png" alt="">  
                                                    </a>
                                            </div>
                                    </div>
                                    <div class="people-content">
                                        <div class="p-p-p elegant">
                                             <div class="classIntru ani" swiper-animate-effect="zoomInLeft" swiper-animate-duration="0.5s" swiper-animate-delay="0.3s">
                                                风采剪影
                                             </div>
                                             <div class="c-c-img">
                                                <div class="c-c-item1">
                                                    <div class="c-c-map img-0">
                                                        <!-- <img class="ani" swiper-animate-effect="honnerT" swiper-animate-duration="1s" swiper-animate-delay="0.5s" src="../img/demeanour/mg1.png" alt=""> -->
                                                    </div> 
                                                    <div class="c-c-map img-1">
                                                        <!-- <img class="ani" swiper-animate-effect="honnerT" swiper-animate-duration="1s" swiper-animate-delay="1s" src="../img/demeanour/mg1.png" alt=""> -->
                                                    </div>
                                                    <div class="c-c-map img-2">
                                                        <!-- <img class="ani" swiper-animate-effect="honnerT" swiper-animate-duration="1s" swiper-animate-delay="1.5s" src="../img/demeanour/mg1.png" alt=""> -->
                                                    </div>
                                                </div> 
                                               <div class="c-c-item2 img-3 ani" swiper-animate-effect="honnerUp" swiper-animate-duration="1s" swiper-animate-delay="2s">
                                                    <!-- <img class="ani"  src="../img/demeanour/mg1.png" alt=""> -->
                                                </div>
                                                <div class="c-c-item1">
                                                        <div class="c-c-map img-4">
                                                            <!-- <img class="ani" swiper-animate-effect="honnerRight" swiper-animate-duration="1s" swiper-animate-delay="2.5s" src="../img/demeanour/mg1.png" alt=""> -->
                                                        </div> 
                                                        <div class="c-c-map img-5">
                                                            <!-- <img class="ani" swiper-animate-effect="honnerRight" swiper-animate-duration="1s" swiper-animate-delay="3s" src="../img/demeanour/mg1.png" alt=""> -->
                                                        </div>
                                                        <div class="c-c-map img-6">
                                                            <!-- <img class="ani" swiper-animate-effect="honnerRight" swiper-animate-duration="1s" swiper-animate-delay="3.5s" src="../img/demeanour/mg1.png" alt=""> -->
                                                        </div>
                                                </div>
                                                <div class="c-c-item2 ani img-7" swiper-animate-effect="honnerBottom" swiper-animate-duration="1s" swiper-animate-delay="4s">
                                                    <!-- <img   src="../img/demeanour/mg1.png" alt=""> -->
                                                </div>
                                             </div>
                                        </div>
                                    </div>
                            </div>
                    </div>
                    <!-- <div class="swiper-slide box_bg area_1"> -->

<!----------------------------------------- 部门成员 --------------------------------------------------->
                    <div class="swiper-slide box_bg area_1 swiper-no-swiping">
                            <div class="container bg-color-bg">
                                    <div class="top-title">
                                            <div class="system">
                                                    <!-- <a class="goback-syz bg-color-bg" onclick="bzApi.close()">
                                                            <img src="../img/system/main.png" alt="">  
                                                    </a> -->
                                                    <a class="goback-sys bg-color-bg"  onclick="tomessage()">
                                                       <img src="../img/system/back.png" alt="">  
                                                    </a>
                                                    <!-- <a class="gonext-sys bg-color-bg">
                                                        <img src="../img/system/setting.png" alt="">  
                                                    </a> -->
                                            </div>
                                    </div>
                                    <div class="people-content">
                                        <div class="p-p-p person">
                                            <div class="classIntru ani" swiper-animate-effect="rubberBand" swiper-animate-duration="0.5s" swiper-animate-delay="0.3s">
                                                    <i>部</i>
                                                    <i>门</i>
                                                    <i>成</i>
                                                    <i>员</i>
                                             </div>
                                             <div class="m-m-person bg-color-border">
                                                <div class="m-m-clc" id="peopleQ">
                                                   <!-- <div class="pre-item">
                                                        <div class="pre-top">
                                                        <div class="pre-name">张震发</div>
                                                        <div class="p-j-job">班长</div>
                                                        </div>
                                                        <div class="imgIcon">
                                                        <img src="'../img/01/1.png" alt="">
                                                        </div>
                                                    </div> -->
                                                </div>        
                                             </div>
                                        </div>
                                    </div>
                                    <div class="diago">
                                        <div class="diado-content diago-active">
                                            <div class="diago-title">
                                                <div class="diago-left">个性化设置</div>
                                                <div></div>
                                            </div>
                                            <div class="model-content">
                                                <div class="model-list">
                                                    <div >模板一</div>
                                                    <div></div>
                                                </div>
                                            </div>
                                            <div class="diago-bottom">
                                                <div class="totrue">确定</div>
                                                <div class="cancel">取消</div>
                                            </div>
                                            <div class="choose">
                            
                                            </div>
                                        </div>
                                    </div>
                            </div>
                    </div>

<!----------------------------------------- 学习园地 --------------------------------------------------->
                    <!-- <div class="swiper-slide box_bg area_1 swiper-no-swiping">
                            <div class="container bg-color-bg">
                                    <div class="top-title">
                                        <div class="top-title">
                                            <div class="system">
                                                    <a class="goback-syz bg-color-bg" onclick="bzApi.close()">
                                                            <img src="../img/system/main.png" alt="">  
                                                    </a>
                                                    <a class="goback-sys bg-color-bg"  onclick="tomessage()">
                                                        <img src="../img/system/back.png" alt="">  
                                                    </a>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="people-content">
                                        <div class="p-p-p study">
                                             <div class="classIntru ani" ani" swiper-animate-effect="rubberBand" swiper-animate-duration="0.5s" swiper-animate-delay="0.3s">
                                                学习园地
                                             </div>
                                             <div class="m-m-person bg-color-border" >
                                                 <div class="m-m-clc" id="h-commoms">
                                                 </div>
                                             </div>
                                        </div>
                                    </div>
                            </div>
                    </div> -->

<!----------------------------------------- 班组愿景 --------------------------------------------------->
                    <!-- <div class="swiper-slide box_bg area_1 swiper-no-swiping">
                            <div class="container bg-color-bg">
                                    <div class="top-title">
                                            <div class="system">
                                                    <a class="goback-syz bg-color-bg" onclick="bzApi.close()">
                                                            <img src="../img/system/main.png" alt="">  
                                                    </a>
                                                    <a class="goback-sys bg-color-bg"  onclick="tomessage()">
                                                       <img src="../img/system/back.png" alt="">  
                                                    </a>
                                                    <a class="gonext-sys bg-color-bg classhlast" id="classh" onclick="classhlast()">
                                                        <img src="../img/system/edit.png" alt="">  
                                                    </a>
                                            </div>
                                    </div>
                                    <div class="people-content">
                                        <div class="p-p-p classhope">
                                             <div class="classIntru hope ani" ani" swiper-animate-effect="rubberBand" swiper-animate-duration="0.5s" swiper-animate-delay="0.3s">
                                                班组愿景
                                             </div>
                                             <div class="m-m-person bg-color-border">
                                                <textarea  class="hopeMessage" readonly></textarea>
                                             </div>
                                        </div>
                                    </div>
                            </div>
                    </div> -->

<!----------------------------------------- 要务公开 --------------------------------------------------->
                    <div class="swiper-slide box_bg area_1 swiper-no-swiping">
                        <div class="container bg-color-bg" id="pub_open">
                            <div class="top-title">
                                <div class="system">
                                        <!-- <a class="goback-syz bg-color-bg" onclick="bzApi.close()">
                                                <img src="../img/system/main.png" alt="">  
                                        </a> -->
                                        <a class="goback-sys bg-color-bg"  onclick="tomessage()">
                                            <img src="../img/system/back.png" alt="">  
                                        </a>
                                        <a class="goback-sys bg-color-bg"  onclick="pubAffairshow()">
                                            <img src="../img/system/add.png" alt="">  
                                        </a>
                                        <a class="gonext-sys bg-color-bg classhlast" id="pubAffair2"  onclick="editpubAffair()">
                                            <img src="../img/system/edit.png" alt="">  
                                        </a>
                                </div>
                            </div>
                            <div class="people-content">
                                <div class="p-p-p classhope">
                                        <div class="classIntru hope ani" ani" swiper-animate-effect="rubberBand" swiper-animate-duration="0.5s" swiper-animate-delay="0.3s">
                                        要务公开
                                        </div>
                                        <div class="m-m-person bg-color-border">
                                            <div class="p_open">  
                                                <div class="public_imgs fl">
                                                    <div class="affairImgWrap">
                                                        <!-- <img src="../img/02/affair_file.png" alt=""> -->
                                                    </div>
                                                </div>                                          
                                                <div class="public_affair fl">
                                                    <ul class="public_affair_titBox">
                                                        <!-- <li class="public_affair_tit"><a class="active" href="">1.“检修创优”岗位竞赛评比</a></li>
                                                        <li class="public_affair_tit"><a href="">2.月度优胜班组</a></li>
                                                        <li class="public_affair_tit"><a href="">3.党员评比</a></li>
                                                        <li class="public_affair_tit"><a href="">4.外包清单</a></li>
                                                        <li class="public_affair_tit"><a href="">5.较大风险项目</a></li> -->
                                                    </ul>
                                                                                  
                                                    <div class="affair_file_content">
                                                        <div class="public_affair_tit">附件</div>
                                                        <ul class="affair_file_ul">
                                                            <!-- <li><a href="">运行部党支部“三亮一比、对标管理”活动实施方案.doc</a></li>
                                                            <li><a href="">检修部党支部开展“争A创优、党员带头”.主题活动实施方案doc</a></li>
                                                            <li><a href="">运行部党支部“三亮一比、对标管理”活动实施方案.xls</a></li> -->
                                                        </ul>
                                                    </div>
                                                                                        
                                                </div>  
                                        </div>
                                        </div>
                                </div>
                            </div>
                            
                        </div>             
                    </div>
                </div>
                <div class="swiper-pagination"></div>
          </div>

     </div>

     <!--部门简介编辑弹出窗-->
    <div class="diago" id="diago">
            <div class="diado-content diago-active">
                <div class="diago-title">
                    <div class="diago-left">简介编辑</div>
                    <div class="diago-close"></div>
                </div>
                <div class="model-content">
                    <div class="editCon">
                        <h3>部门简介内容</h3>
                        <div class="editDiv editDivs">
                            <textarea placeholder="请输入班组简介内容" id="editInstr"></textarea>
                        </div>
                        <!-- <h3>编辑时间</h3>
                        <div class="editDiv c-datepicker-date-editor c-datepicker-single-editor J-datepicker-day">
                            <input readonly placeholder="" autocomplete="off" name="" class="c-datepicker-data-input only-date edittimeinstru">
                        </div> -->
                        <div class="wordlimit">限制1000字以内</div>
                        <div class="clearfix qcimg">
                            <div class="qcodemsg qcodemsgitem"></div>
                            <div class="rightword">
                                <div class="uploadtop">可app扫码上传</div>
                                <div class="uploaddown">简介编辑内容</div>
                            </div>
                            <div class="reshnew" onclick="jianjie()">刷新</div>
                        </div>
                    </div>
                </div>
                <div class="diago-bottom">
                    <div class="totrue" id="instruTure">确定</div>
                    <div class="cancel">取消</div>
                </div>
                <div class="choose">

                </div>
            </div>
    </div>
    <!--班组愿景编辑弹出窗-->
    <div class="diago diagohope" id="diagohope">
            <div class="diado-content diago-active">
                <div class="diago-title">
                    <div class="diago-left">愿景编辑</div>
                    <div class="diago-close"></div>
                </div>
                <div class="model-content">
                    <div class="editCon">
                        <h3>班组愿景内容</h3>
                        <div class="editDiv">
                            <textarea placeholder="请输入班组愿景内容" id="edithope">111111111</textarea>
                        </div>
                        <div class="wordlimit">限制1000字以内</div>
                        <div class="clearfix qcimg">
                            <div class="qcodemsg3 qcodemsgitem"></div>
                            <div class="rightword">
                                <div class="uploadtop">可app扫码上传</div>
                                <div class="uploaddown">内容</div>
                            </div>
                            <div class="reshnew" onclick="jianjie()">刷新</div>
                        </div>
                    </div>
                </div>
                <div class="diago-bottom">
                    <div class="totrue" id="instruTures">确定</div>
                    <div class="cancel">取消</div>
                </div>
                <div class="choose">

                </div>
            </div>
    </div>
     <!-- 添加荣誉弹出框 -->
    <div class="next-diago">
        <div class="diado-content diago-active">
            <div class="diago-title">
                <div class="diago-left">添加荣誉</div>
                <div class="diago-close"></div>
            </div>
            <div class="honner-content">
                <div class="honner-left">
                    <div class="honner-top">
                        <div class="honner-l">上传荣誉</div>
                        <!-- <div class="honner-r">
                            <img src="../img/system/add.png">
                        </div> -->
                    </div>
                    <div class="honner-img">
                        <!--<div class="img-h-list">
                                <img src="../img/demeanour/mg1.png" alt="">
                                <div class="img-click">
                                    <img src="../img/system/mode_close.png" alt="">
                                </div>
                            </div>-->
                    </div>
                </div>
                <div class="honner-right" style="width: 700px;">
                    <div class="editCon icon">
                        <!-- <h3>
                        上传人</h3>
                        <div class="editDiv">
                            <input type="text" placeholder="上传人" id='uploadUser'>
                        </div> -->
                        <h3>
                            <i>*</i>
                            荣誉名称</h3>
                        <div class="editDiv">
                            <input type="text" placeholder="请输入荣誉名称" id='uploadUserdec' maxlength="10">
                            <p class="uplod_user">荣誉名称不允许为空 ！</p>
                        </div>
                        <h3><i>*</i> 获奖时间</h3>
                        <div class="editDiv c-datepicker-date-editor c-datepicker-single-editor J-datepicker-day">
                            <input readonly readonly placeholder="" autocomplete="off" name=""
                                class="c-datepicker-data-input only-date" id="modifyDate">
                            <!-- <p class="uplod_time">时间不允许为空 ！</p> -->
                        </div>
                        <h3>
                            <i>*</i>
                            上传荣誉</h3>
                        <div class="upload">
                            <input type="file" accept="image/*;capture=camera" name="files" multiple="multiple"
                                class="upvalue" id="imgUpload">
                            <div class="up-word">
                                <!-- <img src="../img/system/add.png" alt="">
                                            <div>
                                                本地上传
                                            </div> -->
                            </div>

                            <p class="upload_img">请上传图片 ！</p>

                            <div class="clearfix qcimgs">
                                <div class="qcodemsg2 qcodemsgitem"></div>
                                <div class="rightword">
                                    <div class="uploadtop">可app扫码上传</div>
                                    <div class="uploaddown">内容</div>
                                </div>
                            </div>
                            <div class="resloadk" onclick="getwall()">刷新</div>
                        </div>
                        <p class="next-title">
                            可上传4:3(横图)或3:4(竖图)两种比例
                            <span class="imgtopp"> 请选择图片尺寸更小的上传</span>
                        </p>
                        <span style="font-size: 12px;color: #ccc;">图片质量不超过8M，图片名称限纯数字或英文字母</span>

                    </div>
                    <p class="add_upload">新增</p>
                </div>
                <!-- <div class="honner-right honner-righttwo">
                        <div class="editCon icon">
                            <h3>
                            上传人</h3>
                            <div class="editDiv">
                                <input type="text" placeholder="上传人" id='uploadUser-update'>
                            </div>
                            <h3>
                            上传描述</h3>
                            <div class="editDiv">
                                <input type="text" placeholder="描述内容" id='uploadUserdec-update' maxlength="10">
                            </div>
                            <h3>编辑时间</h3>
                            <div class="editDiv c-datepicker-date-editor c-datepicker-single-editor J-datepicker-day">
                                <input readonly readonly placeholder="" autocomplete="off" name="" class="c-datepicker-data-input only-date" id="modifyDate-update">
                            </div>
                            <h3>
                                <i>*</i>
                            上传图片</h3>
                            <div class="upload">
                                <div class="up-word">
                                </div>
                            </div>
                        </div>
                        <p class="add_upload" onclick="addimg()">更改</p>
                    </div> -->
            </div>
            <div class="diago-bottom">
                <div class="totrue" id="sureUpload" onchange="imgchangeinput()">确定</div>
                <div class="cancel">取消</div>
            </div>
            <div class="choose">

            </div>
            <div class="loading-img">
                <div class="loading">
                    <span></span>
                    <span></span>
                    <span></span>
                    <span></span>
                    <span></span>
                </div>
            </div>

        </div>

    </div>
    <!-- 添加风采弹出框 -->
    <div class="next-diago-two">
        <div class="diado-content diago-active">
            <div class="diago-title diago-title-two">
                <div class="diago-left">添加风采</div>
                <div class="diago-close"></div>
            </div>
            <div class="honner-content honner-content-two">
                <div class="honner-left honner-left-two">
                    <div class="honner-top">
                        <div class="honner-l">上传图片</div>
                        <!-- <div class="honner-r-two">
                                <img src="../img/system/add.png">
                            </div> -->
                    </div>
                    <div class="honner-img-two">
                        <div class="img-h-listtwo">
                            <div class="img-h img-h-0">
                            </div>
                            <div onclick="imgupload(0)" class="img-c img-c-0">
                                请上传图片
                            </div>
                            <div class="img-click img-click-0" data-index="0">
                                <img src="../img/system/mode_close.png" alt="">
                            </div>
                        </div>
                        <div class="img-h-listtwo">
                            <div class="img-h img-h-1">
                            </div>
                            <div onclick="imgupload(1)" class="img-c img-c-1">
                                请上传图片
                            </div>
                            <div class="img-click img-click-1" data-index="1">
                                <img src="../img/system/mode_close.png" alt="">
                            </div>
                        </div>
                        <div class="img-h-listtwo">
                            <div class="img-h img-h-2">
                            </div>
                            <div onclick="imgupload(2)" class="img-c img-c-2">
                                请上传图片
                            </div>
                            <div class="img-click img-click-2" data-index="2">
                                <img src="../img/system/mode_close.png" alt="">
                            </div>
                        </div>
                        <div class="img-h-listtwo">
                            <div class="img-h img-h-3">
                            </div>
                            <div onclick="imgupload(3)" class="img-c img-c-3">
                                请上传图片
                            </div>
                            <div class="img-click img-click-3" data-index="3">
                                <img src="../img/system/mode_close.png" alt="">
                            </div>
                        </div>
                        <div class="img-h-listtwo">
                            <div class="img-h img-h-4">
                            </div>
                            <div onclick="imgupload(4)" class="img-c img-c-4">
                                请上传图片
                            </div>
                            <div class="img-click img-click-4" data-index="4">
                                <img src="../img/system/mode_close.png" alt="">
                            </div>
                        </div>
                        <div class="img-h-listtwo">
                            <div class="img-h img-h-5">
                            </div>
                            <div onclick="imgupload(5)" class="img-c img-c-5">
                                请上传图片
                            </div>
                            <div class="img-click img-click-5" data-index="5">
                                <img src="../img/system/mode_close.png" alt="">
                            </div>
                        </div>
                        <div class="img-h-listtwo">
                            <div class="img-h img-h-6">
                            </div>
                            <div onclick="imgupload(6)" class="img-c img-c-6">
                                请上传图片
                            </div>
                            <div class="img-click img-click-6" data-index="6">
                                <img src="../img/system/mode_close.png" alt="">
                            </div>
                        </div>
                        <div class="img-h-listtwo">
                            <div class="img-h img-h-7">
                            </div>
                            <div onclick="imgupload(7)" class="img-c img-c-7">
                                请上传图片
                            </div>
                            <div class="img-click img-click-7" data-index="7">
                                <img src="../img/system/mode_close.png" alt="">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="honner-right honner-right-two">
                    <div class="editCon icon">
                        <!-- <h3>
                            上传人</h3>
                            <div class="editDiv">
                                <input type="text" placeholder="上传人" id='uploadUsertwo'>
                            </div> -->
                        <!-- <h3>
                                上传描述</h3> -->
                        <div class="editDiv">
                            <!-- <input type="text" placeholder="描述内容" id='uploadUserdec' maxlength="10"> -->
                            <!-- <p class="uplod_user">上传人不允许为空 ！</p> -->
                        </div>
                        <!-- <h3>
                                编辑时间</h3>
                            <div class="editDiv c-datepicker-date-editor c-datepicker-single-editor J-datepicker-day">
                                <input readonly placeholder="" autocomplete="off" name="" class="c-datepicker-data-input only-date" id="modifyDatetwo">
                            </div> -->
                        <div class="clearfix qcimg">
                            <div class="qcodemsg1 qcodemsgitem"></div>
                            <div class="rightword">
                                <p class="uploadtop" style="width:108px;line-height: 20px;">请先选择区域,再app扫码上传图片</p>
                                <!-- <div class="uploaddown"></div> -->
                            </div>
                            <div class="hsdasd" onclick="getwall()">刷新</div>
                        </div>
                        <h3 style="margin-top:30px;"><i>*</i>上传图片</h3>
                        <div class="upload">
                            <input type="file" accept="image/*" name="files" class="upvalue" id="imgUploadtwo">
                            <div class="up-word-two">
                                <!-- <img src="../img/system/add.png" alt="">
                                                <div>
                                                    本地上传
                                                </div> -->
                            </div>

                            <p class="upload_img">请上传图片 ！</p>
                        </div>
                        <p class="next-title">
                            可上传3:2(横图)或2:3(竖图)两种比例<span class="imgtopptwo">请选择图片尺寸更小的上传</span>
                        </p>
                        <span style="font-size: 12px;color: #ccc;">图片质量不超过8M，图片名称限纯数字或英文字母</span>
                    </div>
                    <p class="add_upload-two">新增</p>
                </div>
            </div>
            <div class="diago-bottom">
                <div class="totrue" id="sureUpload-two">确定</div>
                <div class="cancel">取消</div>
            </div>
            <div class="choose-two">

            </div>
            <div class="loading-img">
                <div class="loading">
                    <span></span>
                    <span></span>
                    <span></span>
                    <span></span>
                    <span></span>
                </div>
            </div>
        </div>

    </div>

    <div class="newposition">
        <div class="content-item-scroller">
            <img src=""> 
        </div>       
    </div>

    <!-- 添加要务弹出窗 -->
    <div class="next-diago2 diagoAff">
            <div class="diado-content diago-active">
                <div class="diago-title">
                    <div class="diago-left">添加要务</div>
                    <div class="diago-close"></div>
                </div>
                <div class="honner-content">
                    <div class="honner-left" style="display: none;">
                        <div class="honner-top">
                            <div class="honner-l">上传荣誉</div>
                            <!-- <div class="honner-r">
                                <img src="../img/system/add.png">
                            </div> -->
                        </div>
                        <div class="honner-img">
                            <!--<div class="img-h-list">
                                    <img src="../img/demeanour/mg1.png" alt="">
                                    <div class="img-click">
                                        <img src="../img/system/mode_close.png" alt="">
                                    </div>
                                </div>-->
                        </div>
                    </div>
                    <div class="honner-right">
                        <div class="editCon icon">
                            <!-- <h3>
                            上传人</h3>
                            <div class="editDiv">
                                <input type="text" placeholder="上传人" id='uploadUser'>
                            </div> -->

                            <h3>
                                <i>*</i>
                                标题</h3>
                            <div class="editDiv">
                                <input type="text" placeholder="请输入要务标题" id='affairName' maxlength="10">
                                <p class="uplod_user">标题名称不允许为空 ！</p>
                            </div>

                            <!-- 上传图片区域 -->
                            <div class="affairimg-section">                              
                                <h3>
                                    <i>*</i>
                                    图片
                                    <span style="font-size: 18px;color: #ccc;">最佳比例3:4，不超过8M，图片名称限纯文字或英文字母</span>
                                </h3>
    
                                <div class="z_photo z_photo1 upimg-div clearfix" id="z_pic">
                                    <div class="upImg-section">
                                        <!--<section class="up-section fl">
                                            <span class="up-span"></span>
                                            <img src="img/buyerCenter/a7.png" class="close-upimg">
                                            <img src="img/buyerCenter/3c.png" class="type-upimg" alt="添加标签">
                                            <img src="img/test2.jpg" class="up-img">
                                            <p class="img-namep"></p>
                                            <input id="taglocation" name="taglocation" value="" type="hidden">
                                            <input id="tags" name="tags" value="" type="hidden">
                                        </section>-->
                                    </div>                           
                                        <section class="z_file fl">
                                            <img src="../img/system/upload.jpg" class="add-img">
                                            <input type="file" name="file" id="file" class="file" value="" accept="image/jpg,image/jpeg,image/png,image/bmp" multiple />
                                        </section>
                                </div>
    
                                <aside class="mask works-mask">
                                <div class="mask-content">
                                    <p class="del-p ">您确定要删除图片吗？</p>
                                    <p class="check-p"><span class="del-com wsdel-ok">确定</span><span class="wsdel-no">取消</span></p>
                                </div>
                                </aside>
                            </div>
                                                          
                            <!-- <div class="upload">
                                <input type="file" accept="image/*;capture=camera" name="files" multiple="multiple"
                                    class="upvalue" id="imgUpload2">
                                    <img src="" alt="">
                                <div class="up-word">
                                    <img src="../img/system/add.png" alt="">
                                                <div>
                                                    本地上传
                                                </div>
                                </div>
        
                                <p class="upload_img">请上传图片 ！</p>

                            </div>                          -->

                            <!-- 上传附件区域 -->
                            <div class="affairfile-section">
                                <h3>
                                    <i></i>
                                    附件
                                    <span style="font-size: 18px;color: #ccc; padding-left: 50px;">单个文件不超过10M</span>
                                </h3>

                                <div class="z_photo z_photo2 upimg-div" id="z_file">
                                    <section class="z_file2">
                                        <img src="../img/system/add.png" class="add-img">
                                        <input type="file" name="file2" id="file2" class="file2" value="" multiple />
                                    </section>
                                    <div class="upFile-section">
                                        <!-- <ul class="up-section2">
                                        <li><a href="">单个文件名.doc</a><span class="delfile"></span></li>
                                        <li><a href="">单个文件名2.doc</a><span class="delfile"></span></li>                        
                                    </ul>       -->
                                    </div>                         
                                </div>

                                <aside class="mask works-mask2">
                                    <div class="mask-content">
                                        <p class="del-p">您确定要删除附件？</p>
                                        <p class="check-p"><span class="del-com wsdel-ok">确定</span><span class="wsdel-no">取消</span></p>
                                    </div>
                                </aside>
                            </div>

                        </div>
                    </div>

                </div>
                <div class="diago-bottom">
                        <div class="dele totrue fl" id="deleAffair">删除栏目</div>
                    <div class="totrue" id="sureUploadAffairPic" onchange="imgchangeinput()">确定</div>
                    <div class="cancel">取消</div>
                </div>
                <div class="choose">
        
                </div>
                <div class="loading-img">
                    <div class="loading">
                        <span></span>
                        <span></span>
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                </div>
        
            </div>
        
    </div>   


        <script src="../js/config.js"></script>
     <script type="text/javascript">
		 var arr =[];
		 var flag = ""
        $(function(){                 
            // uploadFile(3)
            var DATAPICKERAPI = {
                // 默认input显示当前月,自己获取后填充
                activeMonthRange: function () {
                    return {
                        begin: moment().set({ 'date': 1, 'hour': 0, 'minute': 0, 'second': 0 }).format('YYYY-MM-DD HH:mm:ss'),
                        end: moment().set({ 'hour': 23, 'minute': 59, 'second': 59 }).format('YYYY-MM-DD HH:mm:ss')
                    }
                },
                shortcutMonth: function () {
                    // 当月
                    var nowDay = moment().get('date');
                    var prevMonthFirstDay = moment().subtract(1, 'months').set({ 'date': 1 });
                    var prevMonthDay = moment().diff(prevMonthFirstDay, 'days');
                    return {
                        now: '-' + nowDay + ',0',
                        prev: '-' + prevMonthDay + ',-' + nowDay
                    }
                },
                // 注意为函数：快捷选项option:只能同一个月份内的
                rangeMonthShortcutOption1: function () {
                    var result = DATAPICKERAPI.shortcutMonth();
                    return [{
                        name: '昨天',
                        day: '-1,-1',
                        time: '00:00:00,23:59:59'
                    }, {
                        name: '这一月',
                        day: result.now,
                        time: '00:00:00,'
                    }, {
                        name: '上一月',
                        day: result.prev,
                        time: '00:00:00,23:59:59'
                    }];
                },
                // 快捷选项option
                rangeShortcutOption1: [{
                    name: '最近一周',
                    day: '-7,0'
                }, {
                    name: '最近一个月',
                    day: '-30,0'
                }, {
                    name: '最近三个月',
                    day: '-90, 0'
                }],
                singleShortcutOptions1: [{
                    name: '今天',
                    day: '0'
                }, {
                    name: '昨天',
                    day: '-1',
                    time: '00:00:00'
                }, {
                    name: '一周前',
                    day: '-7'
                }]
            };
            //十分秒年月日单个
            $('.J-datepicker').datePicker({
                hasShortcut:true,
                min:'2018-01-01 04:00:00',
                max:'2019-04-29 20:59:59',
                shortcutOptions:[{
                    name: '今天',
                    day: '0'
                }, {
                    name: '昨天',
                    day: '-1',
                    time: '00:00:00'
                }, {
                    name: '一周前',
                    day: '-7'
                }],
                hide:function(){
                    console.info(this)
                }
            });

            //年月日单个
            $('.J-datepicker-day').datePicker({
                hasShortcut: true,
                format:'YYYY-MM-DD',
                shortcutOptions: [{
                    name: '今天',
                    day: '0'
                }, {
                    name: '昨天',
                    day: '-1'
                }, {
                    name: '一周前',
                    day: '-7'
                }]
            });

            //年月日范围
            $('.J-datepicker-range-day').datePicker({
                hasShortcut: true,
                format: 'YYYY-MM-DD',
                isRange: true,
                shortcutOptions: DATAPICKERAPI.rangeShortcutOption1
            });

            //十分年月日单个
            $('.J-datepickerTime-single').datePicker({
                format: 'YYYY-MM-DD HH:mm'
            });

            //十分年月日范围
            $('.J-datepickerTime-range').datePicker({
                format: 'YYYY-MM-DD HH:mm',
                isRange: true
            });

            //十分秒年月日范围，包含最大最小值
            $('.J-datepicker-range').datePicker({
                hasShortcut: true,
                min: '2018-01-01 06:00:00',
                max: '2019-04-29 20:59:59',
                isRange: true,
                shortcutOptions: [{
                    name: '昨天',
                    day: '-1,-1',
                    time: '00:00:00,23:59:59'
                },{
                    name: '最近一周',
                    day: '-7,0',
                    time:'00:00:00,'
                }, {
                    name: '最近一个月',
                    day: '-30,0',
                    time: '00:00:00,'
                }, {
                    name: '最近三个月',
                    day: '-90, 0',
                    time: '00:00:00,'
                }],
                hide: function () {
                    console.info(this.$input.eq(0).val(), this.$input.eq(1).val())
                }
            });
            //十分秒年月日范围，限制只能选择同一月，比如2018-10-01到2018-10-30
            $('.J-datepicker-range-betweenMonth').datePicker({
                isRange: true,
                between:'month',
                hasShortcut: true,
                shortcutOptions: DATAPICKERAPI.rangeMonthShortcutOption1()
            });

            //十分秒年月日范围，限制开始结束相隔天数小于30天
            $('.J-datepicker-range-between30').datePicker({
                isRange: true,
                between: 30
            });

            //年月单个
            $('.J-yearMonthPicker-single').datePicker({
                format: 'YYYY-MM',
                min: '2018-01',
                max: '2019-04'
            });

            //选择年
            $('.J-yearPicker-single').datePicker({
                format: 'YYYY',
                min: '2018',
                max: '2020'
            });


        });
        
        // $(".classhlast").click(
        //     function(e){
                
        //         e.stopPropagation();
        //     }
        // )
       
        $("#diagohope .cancel").click(
            function(){
                $("#diagohope").css("display",'none');

            }
        )
        $("#diagohope .totrue").click(
            function(){
                // saveInstru1();
                $("#diagohope").css("display",'none');
            }
        )
 
		
		//关闭
        $(".diago-close").click(
            function(){
                $("#diago").css("display",'none');
                $("#diagohope").css("display","none");
				$(".next-diago").css("display","none");
                $(".next-diago-two").css("display","none");
                $(".diagoAff").css("display","none");
                mySwiper.startAutoplay();
            }
        )
        $(".next-diago-two .cancel").click(
            function(){
                mySwiper.startAutoplay();
                location.href = "./detail1.html?number=3&userId="+userId+"&bzId="+bzId+"&regDeptId="+regDeptId;
                // location.href = "./detail1.html?number=3&userId="+'b070e77e-2289-4b58-979b-2db72d42f9a4'+"&bzId="+'feae4a0f-5cac-4f03-9bca-bcfa099b54f8'+"&regDeptId="+regDeptId;

                $(".next-diago-two").css("display","none");
                getwall()
            }
        )
        $(".next-diago .cancel").click(
            function(){
                $(".next-diago").css("display","none");
                // getwall();
                location.href = "./detail1.html?number=2&userId="+userId+"&bzId="+bzId+"&regDeptId="+regDeptId;
                // location.href = "./detail1.html?number=2&userId="+'b070e77e-2289-4b58-979b-2db72d42f9a4'+"&bzId="+'feae4a0f-5cac-4f03-9bca-bcfa099b54f8'+"&regDeptId="+regDeptId;

            }
        )
        $("#diago .cancel").click(
            function(){
                mySwiper.startAutoplay();
                // location.href = "./detail1.html?number=2&userId="+userId+"&bzId="+bzId;
                $("#diago").css("display",'none');
            }
        )
        //取消 
        // $(".diagoAff .cancel").click(
        //     function(){
        //         mySwiper.startAutoplay();
        //         location.href = "./detail1.html?number=5&userId="+userId+"&bzId="+bzId+"&regDeptId="+regDeptId;
        //         $(".diagoAff").css("display",'none');
        //     }
        // )
        $(".diagoAff .cancel").click(
            function(){
                mySwiper.startAutoplay();
                // location.href = "./detail1.html?number=2&userId="+userId+"&bzId="+bzId;
                $(".diagoAff").css("display",'none');
            }
        )
        $("#diago .totrue").click(
            function(){
                mySwiper.startAutoplay();
                $("#diago").css("display",'none');
            }
        )
        var jpathurl = '?userId='+userId+"&bzId="+bzId+"&regDeptId="+regDeptId;
        // var jpathurl = '?userId='+'b070e77e-2289-4b58-979b-2db72d42f9a4'+"&bzId="+'feae4a0f-5cac-4f03-9bca-bcfa099b54f8'+"&regDeptId="+regDeptId;

        // console.log(jpathurl)
        function tomessage(){
            location.href="../index.html"+jpathurl;
        }
    </script>
    <script src="../js/swiper.min.js"></script>
    <script src="../js/swiper.animate.min.js"></script>
    <script src="../js/preview-photo.js"></script>
    <script>
        var changeMsg  = 'zred';
        var photoImg="../img/01/person.png";
        var arrbg = ['blue','red','orange','green'];  //背景框
        var crrbg = ['bbg','obg','ybg','gbg'];//背景
        var colorarr = ['#101358','#f7bea0','#9b9b9d'];
        var fontsize = ['#333','#333'] 
        var fontsize1 = ['#999',"#666"]
        var drr = ['#fff','#95bcff','#fff'];
        
        $(".m-m-person").css('background','url(../img/detail/1/'+arrbg[1]+'.png)no-repeat 0 -10px');
        $('.pre-top').css('backgroundColor',colorarr[1]);
        $(".goback-sys").css('backgroundColor','#234def');
        $(".gonext-sys").css('backgroundColor','#234def');
        $(".container").css({'background':'url(../img/detail/1/'+crrbg[1]+'.jpg)no-repeat 0 0','backgroundSize':'cover'})
        $(".pre-name").css('color',fontsize[1]);
        $(".p-j-job").css('color',fontsize1[1]);
        $(".content-item").css('background','url(../img/detail/1/b.png)');
        $(".p-p-p.elegant").css('background','url(../img/detail/1/'+arrbg[1]+'.png)no-repeat 0 -10px');
        $('.m-m-person .bg-tab>a').css("color",drr[2]);
        var changeFlag = 1;
        var mySwiper = new Swiper('.swiper-container', {
            // slidesPerView: 1,
            // slidesPerGroup: 1,
            // speed: 1000,
            // spaceBetween: 30,
            //freeMode: true,
            loop: true,
            // effect : 'fade',
            // fadeEffect: {
            //     crossFade: true,
            // },
            noSwiping : true,
            autoplay:localStorage.getItem("timeSet"),
            // autoplay:4000,
            // touchRatio:0.01,
            autoplayDisableOnInteraction:false,
            initialSlide: Number(num)-1,
            pagination: '.swiper-pagination',
            paginationClickable :true,
            onInit:function(swiper){
                swiperAnimateCache(swiper); //隐藏动画元素 
                swiperAnimate(swiper);
            },
            onSlideChangeEnd:function(swiper){
                swiperAnimate(swiper);
                if(swiper.activeIndex==2){
                    var numC =  Math.floor(arr.length/8)+1;
                    if(arr.length>8){
                        if(changeFlag ==1){
                            changeFlag++;
                            var crr = arr.slice(0,8);
                            honerList(crr);
                        }else{
                            if(changeFlag==numC){
                                var drr = arr.slice((changeFlag-1)*8);
                                changeFlag = 1;
                                honerList(drr);
                            }else{
                                var err = arr.slice((changeFlag-1)*8);
                                 changeFlag++;
                                 honerList(err);
                            }
                        }
                        var lengthW = $(".m-m-person").children().length*220+40;
                        if($(".m-m-t").children().length>7){
                            $(".m-m-t").css('width',lengthW+"px");
                            $(".top-honner").css("float","left");
                            $(".bottom-honner").css("float","left");
                        }else{
                            $(".m-m-t").css('width',"100%");
                            $(".top-honner").css("float","none");
                            $(".bottom-honner").css("float","none");
                        }   
                    }
                }
                 window.PreviewPhoto();
            }
            // allowTouchMove: false,
        });

        //添加荣誉
        $("#honner").click(
            function(){
                // mySwiper.stopAutoplay();
             $(".next-diago").css("display",'block');
                var DateTime = new Date();
                var year =  DateTime.getFullYear();
                var month = DateTime.getMonth()+1;
                var day =  DateTime.getDate();
                time = year+'-'+month+'-'+day;
                $('#modifyDate').val(time);
            }
        )
        //风采剪影编辑
        function fcfcfcf(){
            // mySwiper.stopAutoplay();
            $(".next-diago-two").css("display",'block');
            var DateTime = new Date();
                var year =  DateTime.getFullYear();
                var month = DateTime.getMonth()+1;
                var day =  DateTime.getDate();
                time = year+'-'+month+'-'+day;
                $('#modifyDatetwo').val(time);
            
        }
        //部门简介编辑
        $(".ineditfirst").click(
            function(e){
                mySwiper.stopAutoplay();
                $("#diago").css("display",'block');
                $("#editInstr").val($(".textareainstr").val());
                var DateTime = new Date();
                var year =  DateTime.getFullYear();
                var month = DateTime.getMonth()+1;
                var day =  DateTime.getDate();
                time = year+'-'+month+'-'+day;
                $(".edittimeinstru").val(time);
                e.stopPropagation();
                console.log($("#editInstr").val())

            }
        )

        //展示班组愿景
        function classhlast(){
            // mySwiper.stopAutoplay();
            $(".diagohope").css("display",'block');
            $("#edithope").val($(".hopeMessage").val());
            var DateTime = new Date();
            var year =  DateTime.getFullYear();
            var month = DateTime.getMonth()+1;
            var day =  DateTime.getDate();
            time = year+'-'+month+'-'+day;
            $(".hopetime").val(time);
        }

        var flag = 1;
        //展示添加要务公开弹窗
        function pubAffairshow(){
            flag  = 1;
            mySwiper.stopAutoplay();
            if(AffairsList.length>=5){
                alert('无法继续添加，最多展示5个栏目');
                return false;
            }
            $(".diagoAff").css("display",'block');
            $(".diago-left").text("添加要务");           
            $('.upImg-section').empty();
            $('.upFile-section').empty();
            $('.z_photo1 .z_file').show();
            $('.diagoAff .dele').hide();
            $('#affairName').val('');
        }

        //展示编辑要务公开弹窗
        function editpubAffair(){
            flag  = 2;
            if(!AffairsList.length){
                $('#pubAffair2').hide()
                return false;
            }
            mySwiper.stopAutoplay();
            $(".diagoAff").css("display",'block');
            $(".diago-left").text("编辑要务"); 
            $('.diagoAff .dele').show()
            $('.upImg-section').empty();
            $('.upFile-section').empty();
            $('#affairName').val(AffairsList[affIndex].Content)
            var x = '';
            var y = '';
            // x += `<section class="up-section fl">
            //         <span class="up-span"></span>
            //         <img src="../../img/system/mode_close.png" class="close-upimg" id="upImg" data-pid="${affImgList[0].FileId}">
            //         <img src="${affImgList[0].FilePath}"  class="up-img">
            //         <p class="img-name-p"></p>
            //         <input id='taglocation' name='taglocation' value='' type='hidden'>
            //         <input id='tags' name='tags' value='' type='hidden'/>
            //     </section>`

            x += '<section class="up-section fl">'+
                    '<span class="up-span"></span>'+
                    '<img src="../../img/system/mode_close.png" class="close-upimg" id="upImg" data-pid="'+affImgList[0].FileId+'">'+
                    '<img src="'+affImgList[0].FilePath+'"  class="up-img">'+
                    '<p class="img-name-p"></p>'+
                    '<input id="taglocation" name="taglocation" value="" type="hidden">'+
                    '<input id="tags" name="tags" value="" type="hidden"/>'+
                '</section>'

            $('.upImg-section').html(x)
            $('.z_photo1 .z_file').hide()
            // y +=  `<ul class="up-section2">`
            // for(var i = 0;i<affFileList.length;i++){
            //     y += `<li><a href="${affFileList[i].FilePath}">${affFileList[i].FileName}</a><span data-pid="${affFileList[i].FileId}" class="delfile"></span></li> `
            // }
            // y += `</ul>`


            for(var i = 0;i<affFileList.length;i++){
                y += '<div class="fileDiv"><a href="'+affFileList[i].FilePath+'">'+affFileList[i].FileName+'</a><span data-pid="'+affFileList[i].FileId+'" class="delfile"></span></div>'
            }
            $('.upFile-section').html(y)

        }

        //点击删除栏目
        $('#deleAffair').click(function(){
            $.ajax({
                url: baseUrl + 'api/DepartmentPublish/Delete',
                data: JSON.stringify({       
                    "userId": userId,
                    "data":  PublishId        
                }),
                contentType: 'application/json',
                type: "POST",
                success: function (res){
                    // console.log(res)
                    $('.diagoAff').hide();
                    mySwiper.startAutoplay();
                    if (res.code == 0) {                        
                        if (changeMsg == "zred") {
                            location.href = "./detail1.html?number=2&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                            // location.href = "./detail1.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                        } else if (changeMsg == "zgblue") {
                            location.href = "./detail2.html?number=2&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                            // location.href = "./detail2.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                        } else if (changeMsg == "zgreen") {
                            location.href = "./detail3.html?number=2&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                            // location.href = "./detail3.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                        } else if (changeMsg == "zorange") {
                            location.href = "./detail4.html?number=2&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                            // location.href = "./detail4.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                        }
                        alert("要务栏目删除成功");
                    }else{
                        alert(res.info)
                    }     
                }
            })
        })

         jQuery(function(){
                var strmsg =  bzId + "|班组简介";
                var strmsg1 = "请先选择区域后再扫码上传图片";
                var strmsg2 = bzId + "|班组荣誉";
                var strmsg3 = bzId + "|班组愿景";
                jQuery('.qcodemsg').qrcode(
                    {   
                        text: utf16to8(strmsg),
                         width: 110,
                         height: 110,
                    }
                );
                jQuery('.qcodemsg1').qrcode(
                    {
                        text: utf16to8(strmsg1),
                        width: 110,
                        height: 110,
                    }
                );
                jQuery('.qcodemsg2').qrcode(
                    {
                        text: utf16to8(strmsg2),
                        width: 110,
                        height: 110,
                    }
                );
                jQuery('.qcodemsg3').qrcode(
                    {
                        text: utf16to8(strmsg3),
                        width: 110,
                        height: 110,
                    }
                );

            })
             function utf16to8(str) {
                var out, i, len, c;
                out = "";
                len = str.length;
                for (i = 0; i < len; i++) { c=str.charCodeAt(i); if ((c>= 0x0001) && (c <= 0x007F)) { out +=str.charAt(i);
                    } else if (c> 0x07FF) {
                    out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
                    out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F));
                    out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
                    } else {
                    out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F));
                    out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F));
                    }
                }
                return out;
            }
    </script>
    <script src="../js/detail.js"></script>
    <script>

            var delParent;
            var fileList = '';
            var fileList2 = '';
            var fileNameList = [];
            var defaults = {
                fileType         : ["jpg","png","bmp","jpeg"],   // 上传文件的类型
                fileSize         : 1024 * 1024 * 8                  // 上传文件的大小 10M
            };
            /*点击图片的文本框*/
            $(".file").change(function(){
                defaults.fileType = ["jpg","png"];
                defaults.fileSize = 1024 * 1024 * 8 
                var idFile = $(this).attr("id");
                var file = document.getElementById(idFile);
                // var imgContainer = $(this).parents(".z_photo"); //存放图片的父亲元素
                var imgContainer = $(".upImg-section"); //存放图片的父亲元素
                fileList = file.files; //获取的图片文件
                var input = $(this).parent();//文本框的父亲元素
                var imgArr = [];
                //遍历得到的图片文件
                var numUp = imgContainer.find(".up-section").length;
                var totalNum = numUp + fileList.length;  //总的数量
                if(fileList.length > 1 || totalNum > 1 ){
                    alert('上传图片数目不可以超过'+1+'个，请重新选择');  //一次选择上传超过5个 或者是已经上传和这次上传的到的总数也不可以超过5个
                }
                else if(numUp < 1){
                    fileList = validateUp(fileList);
                    for(var i = 0;i<fileList.length;i++){
                        var imgUrl = window.URL.createObjectURL(fileList[i]);
                            imgArr.push(imgUrl);
                        var $section = $("<section class='up-section fl loading'>");
                            imgContainer.prepend($section);
                        var $span = $("<span class='up-span'>");
                            $span.appendTo($section);
                    
                        var $img0 = $("<img class='close-upimg'>").on("click",function(event){
                            event.preventDefault();
                            event.stopPropagation();
                            $(".works-mask").show();
                            delParent = $(this).parent();
                        });   
                        $img0.attr("src","../../img/system/mode_close.png").appendTo($section);
                        var $img = $("<img class='up-img up-opcity'>");
                            $img.attr("src",imgArr[i]);
                            $img.appendTo($section);
                        var $p = $("<p class='img-name-p'>");
                            $p.html(fileList[i].name).appendTo($section);
                        var $input = $("<input id='taglocation' name='taglocation' value='' type='hidden'>");
                            $input.appendTo($section);
                        var $input2 = $("<input id='tags' name='tags' value='' type='hidden'/>");
                            $input2.appendTo($section);
                        
                    }
                }
                setTimeout(function(){
                        $(".up-section").removeClass("loading");
                        $(".up-img").removeClass("up-opcity");
                    },450);
                    numUp = imgContainer.find(".up-section").length;
                if(numUp >= 1){
                    $(this).parent().hide();
                }
            });
            
            /*点击文件上传的文本框*/
            $("#z_file .file2").change(function(){	
                defaults.fileType = ["doc","docx","txt","pdf","ppt","pptx","xls","xlsx"];
                defaults.fileSize = 1024 * 1024 * 10
                var idFile = $(this).attr("id");
                var file = document.getElementById(idFile);
                // var imgContainer = $(this).parents(".z_photo .upFile-section"); //存放图片的父亲元素
                var imgContainer = $(".upFile-section"); //存放图片的父亲元素
                fileList2 = file.files; //获取的附件文件
                var input = $(this).parent();//文本框的父亲元素
                var imgArr = [];
                //遍历得到的图片文件
                var numUp = imgContainer.find("div").length;
                var totalNum2 = numUp + fileList2.length;  //总的数量
                if(fileList2.length > 3 || totalNum2 > 3 ){
                    alert('上传附件数目不可以超过'+3+'个，请重新选择');  //一次选择上传超过5个 或者是已经上传和这次上传的到的总数也不可以超过5个
                }
                else if(numUp < 3){
                    fileList2 = validateUp(fileList2);
                    for(var i = 0;i<fileList2.length;i++){
                        // <ul class="up-section2">
                        //     <li><a href="">单个文件名.doc</a><span class="delfile"></span></li>
                        // </ul>
                        
                        var imgUrl = window.URL.createObjectURL(fileList2[i]);
                            imgArr.push(imgUrl);

                        var fileName = bzApi.getRealFileName(fileList2[i].name);
                        fileNameList.push(fileName);
    
                        // var $ul = $("<ul class='up-section2'>");
                            // imgContainer.append($ul);
                        var $divs = $("<div class='fileDiv'>");
                        var $as = $('<a>');
                            $as.attr("href",imgArr[i]);
                            // $as.html(fileList2[i].name).appendTo($divs);
                            $as.html(fileName).appendTo($divs);
                        var $span = $("<span class='delfile'>").on("click",function(event){
                            event.preventDefault();
                            event.stopPropagation();
                            $(".works-mask2").show();
                            delParent = $(this).parent();
                        })
                        // var $span  = $("<span class='delfile close-upimg'>").on("click",function(event){
                        //     event.preventDefault();
                        //     event.stopPropagation();
                        //     $(".works-mask").show();
                        //     delParent = $(this).parent();
                        // }); 
                        $span.appendTo($divs)
                        imgContainer.append($divs)
                        // $li.appendTo($ul);
                        
                    }
                }
                setTimeout(function(){
                        // $("#z_file .up-section2").removeClass("loading");
                        $("#z_file .upFile-section").removeClass("loading");
                        $("#z_file .up-img").removeClass("up-opcity");
                    },450);
                    // numUp = imgContainer.find("#z_file .up-section").length;
                    numUp = imgContainer.find("li").length;
                if(numUp >= 3){
                    $(this).parent().hide();
                }
            });
            
            // 防止重复提交
            var submitOff = true;
            //添加或者编辑要务确定上传
            $('#sureUploadAffairPic').unbind('click').click(function(){
                if ( ! $('.upImg-section').is(':has(.up-img)') ) {
                    alert('请上传要务图片')
                    return false
                }
                if(!submitOff){
                    return false
                }
                submitOff = false;
                $('.diagoAff #sureUploadAffairPic').addClass('disableSubmit');
                //添加提交
                if(flag == 1){
                    var fileArr = []
                    var UpdateFile = new FormData();
                    var param = {
                        userId: userId,
                        // userId: 'b070e77e-2289-4b58-979b-2db72d42f9a4',
                        data: {
                            bzId: bzId, //班组ID
                            // bzId: 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8', //班组ID
                            content: $('#affairName').val()
                        }
                    }
    
                    // fileinfosArrt.forEach(
                    //     function (item) {
                    //         param.data.fileinfos.push(item.data)
                    //         UpdateFile.append(
                    //             'file', item.fileObj
                    //         )
                    //     })
                    // if (deletArr.length > 0) {
                    //     param.data.deletefileids = deletArr.join(",")
                    // }
    
                    if(fileList&&fileList.length>0){
                        UpdateFile.append(
                            'imgs', fileList[0]
                        )
                    }
    
                    if(fileList2&&fileList2.length>0){
                        fileList2.forEach(function(item){
                        UpdateFile.append(
                            'files', item
                            )
                        })
                    }
                    
                    // UpdateFile.append(
                    //     'file', fileList2
                    // )
                    UpdateFile.append(
                        'json', JSON.stringify(param)
                    )
    
                    $.ajax({
                        url: baseUrl + 'api/DepartmentPublish/Add',
                        data: UpdateFile,
                        type: "POST",
                        contentType: false,
                        processData: false,
                        success: function (res) {
                            // console.log(res)
                            // $(".loading-img").hide();
                            // param.data.fileinfos = [];
                            // $('.upload').css('background-image', 'url(../img/system/upload.jpg)')
                            $('.diagoAff').hide();
                            mySwiper.startAutoplay();
                            submitOff = true;
                            $('.diagoAff #sureUploadAffairPic').removeClass('disableSubmit');
                            if (res.code == 0) {
                                
                                if (changeMsg == "zred") {
                                    location.href = "./detail1.html?number=5&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                                    // location.href = "./detail1.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                                } else if (changeMsg == "zgblue") {
                                    location.href = "./detail2.html?number=5&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                                    // location.href = "./detail2.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                                } else if (changeMsg == "zgreen") {
                                    location.href = "./detail3.html?number=5&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                                    // location.href = "./detail3.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                                } else if (changeMsg == "zorange") {
                                    location.href = "./detail4.html?number=5&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                                    // location.href = "./detail4.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                                }
                                // fileinfosArr = []
                                // deletArr=[]
                                // imgUrl=''
                                // $('.next-diago').hide()
                                // getwall();
                            }else{
                                alert(res.info)
                            }  
    
                        },
                        error: function(err){
                            // console.log(err)
                            submitOff = true;
                            $('.diagoAff #sureUploadAffairPic').removeClass('disableSubmit');
                        }
                    })
                }else if(flag == 2){//编辑提交
                    affairObj.Content = $('#affairName').val();
                    var fileArr = []
                    var UpdateFile = new FormData();
                    var param = {
                        userId: userId,
                        // userId: 'b070e77e-2289-4b58-979b-2db72d42f9a4',
                        data: affairObj
                    }
    
                    if(fileList&&fileList.length>0){
                        UpdateFile.append(
                            'imgs', fileList[0],fileNameList
                        )
                    }
                    
                    if(fileList2&&fileList2.length>0){
                        fileList2.forEach(function(item){
                            UpdateFile.append(
                                'files', item
                            )
                        })
                    } 
    
                    UpdateFile.append(
                        'json', JSON.stringify(param)
                    )
                    $.ajax({
                        url: baseUrl + 'api/DepartmentPublish/Edit',
                        data: UpdateFile,
                        type: "POST",
                        contentType: false,
                        processData: false,
                        success: function (res){
                            // console.log(res)
                            $('.diagoAff').hide();  
                            mySwiper.startAutoplay(); 
                            submitOff = true;
                            $('.diagoAff #sureUploadAffairPic').removeClass('disableSubmit');                    
                            if (res.code == 0) {
                                if (changeMsg == "zred") {
                                    location.href = "./detail1.html?number=5&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                                    // location.href = "./detail1.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                                } else if (changeMsg == "zgblue") {
                                    location.href = "./detail2.html?number=5&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                                    // location.href = "./detail2.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                                } else if (changeMsg == "zgreen") {
                                    location.href = "./detail3.html?number=5&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                                    // location.href = "./detail3.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                                } else if (changeMsg == "zorange") {
                                    location.href = "./detail4.html?number=5&userId=" + userId + "&bzId=" + bzId + "&regDeptId=" + regDeptId;
                                    // location.href = "./detail4.html?number=2&userId=" + 'b070e77e-2289-4b58-979b-2db72d42f9a4' + "&bzId=" + 'feae4a0f-5cac-4f03-9bca-bcfa099b54f8' + "&regDeptId=" + regDeptId;
                                }
                            }else{
                                alert(res.info)
                            }  
                        },
                        error: function(err){
                            // console.log(err)
                            submitOff = true;
                            $('.diagoAff #sureUploadAffairPic').removeClass('disableSubmit');
                        }
                    })
                }       
    
            })
            
            //删除图片
            $(".z_photo").delegate(".close-upimg","click",function(){
                    $(".works-mask").show();
                    delParent = $(this).parent();
            });
            //确认删除
            $(".works-mask .wsdel-ok").click(function(){
                var fileId = $('.close-upimg').data('pid');
                affairObj.Files = affairObj.Files.filter(function(item) {
                    return item.FileId !== fileId
                })
    
                $(".works-mask").hide();
                var numUp = delParent.siblings().length;
                if(numUp < 1){
                    // delParent.parent().siblings().find(".z_file").css('display','block');
                    $('.z_file').show()
                }
                    delParent.remove();
            });
    
            $(".works-mask .wsdel-no").click(function(){
                $(".works-mask").hide();
            });
            
            $(".works-mask2 .wsdel-no").click(function(){
                $(".works-mask2").hide();
            });
    
            //删除附件
            $(".upFile-section").delegate(".delfile","click",function(){
                    $(".works-mask2").show();
                    delParent = $(this).parent();
            });
            //删除附件确认
            $(".works-mask2 .wsdel-ok").click(function(){
                var fileId = $('.delfile').data('pid');
                affairObj.Files = affairObj.Files.filter(function(item) {
                    console.log(item.FileId != fileId)
                    return item.FileId !== fileId
                })
    
                $(".works-mask2").hide();
                delParent.remove();
            });
            
            function validateUp(files){
                var arrFiles = [];//替换的文件数组
                for(var i = 0, file; file = files[i]; i++){
                    //获取文件上传的后缀名
                    var newStr = file.name.split("").reverse().join("");
                    if(newStr.split(".")[0] != null){
                            var type = newStr.split(".")[0].split("").reverse().join("");
                            // console.log(type+"===type===");
                            if(jQuery.inArray(type, defaults.fileType) > -1){
                                // 类型符合，可以上传
                                if (file.size >= defaults.fileSize) {
                                    alert(file.size);
                                    alert('您这个"'+ file.name +'"文件大小过大');	
                                } else {
                                    // 在这里需要判断当前所有文件中
                                    arrFiles.push(file);	
                                }
                            }else{
                                alert('您这个"'+ file.name +'"上传类型不符合');	
                            }
                        }else{
                            alert('您这个"'+ file.name +'"没有类型, 无法识别');	
                        }
                }
                return arrFiles;
            }
    </script>
</body>
</html>